const initialState = {
    heroes: [],
    hero: {
        _id: "",
        firstName: "",
        lastName: "",
        house: "",
        knownAs: ""
    },
    isLoading: false,
    error: ""
};

export async function getHeroes(page) {
    return {
        "data": [{
            _id: "1" + page,
            firstName: "firstName1",
            lastName: "lastName1",
            house: "1" + page,
            knownAs: "ksks1"
        }, {
            _id: "2" + page,
            firstName: "firstName2",
            lastName: "lastName2",
            house: "2" + page,
            knownAs: "ksks2"
        }]
    }
    // return await http.get(BaseUrl.heroes);
}

export async function getHeroById(id) {
    return {
        "data": {
            _id: "1",
            firstName: "firstName1",
            lastName: "lastName1",
            house: "1",
            knownAs: "ksks1"
        }
    }
    // return await http.get(`${BaseUrl.heroes}${id}`);
}

export async function postHero(hero) {
    return "postHero"
        // return await http.post(BaseUrl.heroes, hero);
}

export async function putHero(hero) {
    return "putHero"
    console.log(hero);
    // return await http.put(`${BaseUrl.heroes}${hero._id}`, hero);
}

export async function deleteHero(id) {
    return "deleteHero"
        // return await http.delete(`${BaseUrl.heroes}${id}`);
}